'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  //支付
  router.get('/a', controller.pay.alipay);

  router.get('/', controller.home.index);
  //数据渲染科普
  router.post('/api/hotdata', controller.home.hotdata);
  //登录
  router.post('/api/login', controller.home.login);
  //注册
  router.post('/api/register', controller.home.register);
  //搜索
  router.post('/api/searchshop', controller.home.searchshop);
  //商城渲染
  router.post('/api/shop', controller.home.shop);
  router.post('/shopcarlist', controller.home.shopcarlist);
  router.post('/api/homelist', controller.home.homelist);
  //添加到购物车
  router.post('/addcar', controller.home.addcar);
  router.post('/delcar', controller.home.delcar);
  router.post('/changecar', controller.home.changecar);
  router.post('/exitflag', controller.home.exitflag);
  router.post('/checkall', controller.home.checkall);
  //话题
  router.post("/api/title", controller.home.title);
  //订单渲染
  router.post("/api/shopcar", controller.home.shopcar);
  //筛选
  router.post("/api/searchtype", controller.home.searchtype);
};
